package com.oocl.o2o.client.controller;

import java.util.List;

import javax.annotation.Resource;
import javax.enterprise.inject.Model;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.oocl.o2o.client.entity.Merchant;
import com.oocl.o2o.client.service.MerchantService;
/**
 * @description: 
 * @author  XIEMI2
 * @date Aug 13, 2017 4:00:34 PM
 * @version 1.0
 */
@Controller
public class MerchantController {

	@Resource
	private MerchantService merchantService;
	
	@GetMapping("/merchants")
	private String getAllPassMerchant(HttpServletRequest request){
		List<Merchant> merchants = merchantService.getAllPassMerchantsFromA();
		request.setAttribute("merchants", merchants);
		return "home";
	}
}


